package com.jn.erp.common.utils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <pre>
 *
 * </pre>
 *
 * @author sunjiyong
 * @since 2024/8/28 14:37
 */
public class CommonUtil {

    public static void jsonResponse(HttpServletResponse response, String jsonStr) throws IOException {
        response.setContentType("application/json;charset=UTF-8");
        response.getWriter().write(jsonStr);
    }

    public static boolean isPost(HttpServletRequest request) {
        return request.getMethod().equals("POST");
    }
}
